xenpaging: Fix c/s 23507:0a29c8c3ddf7 ("update machine_to_phys_mapping[] during page...
authorKeir Fraser <keir@xen.org>
Thu, 1 Dec 2011 00:59:58 +0000 (16:59 -0800)
committerKeir Fraser <keir@xen.org>
Thu, 1 Dec 2011 00:59:58 +0000 (16:59 -0800)
commitb6cf65cf7aeb21cea11075da268563fca22ede9c
tree9c6d177354dedeb4ccdefa3d6523cc993ec5aca2
parenta6aed45cf39d2ed4ee7294c08fa0d9d54fcb683e
xenpaging: Fix c/s 23507:0a29c8c3ddf7 ("update machine_to_phys_mapping[] during page deallocation")

This patch clobbers page owner in free_heap_pages() before we are
finished using it. This means that a subsequent test to determine
whether it is safe to avoid safety TLB flushes incorrectly always
determines that it is safe to do so.

The fix is simple: we can defer the original patch's work until after
we are done with the page-owner field.

Thanks to Christian Limpach for spotting this one.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/common/page_alloc.c